package com.tmt.im.service.helper;

import com.tmt.im.common.enums.ChatSessionType;

import java.util.Arrays;

/**
 * @Description TODO
 * @Author wuyi
 * @Date 2024/9/16 22:52
 * @Version 1.0
 **/
public class ChatSessionPoJoHelper {

    public static ChatSessionType getType(String type) {
        return Arrays.stream(ChatSessionType.values()).filter(x -> x.name().equals(type)).findFirst().orElse(null);
    }

    public static boolean getInviteState(int joinMode) {
        return joinMode == 0;
    }

    public static boolean getShutupState(int chatBanned){
        return chatBanned == 0;
    }

}
